package View;

import java.awt.Rectangle;
import java.awt.event.ActionListener;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JComboBox;

public class SettingDistributionsView extends JFrame{
	
	JLabel idLabel;
	JLabel lblCategory;
	JLabel lblType;
	JLabel lblProduct;
	JTextField txtCatID;
	JTextField txtCategory;
	JTextField txtName;
	JComboBox jComboProdcut;

	public SettingDistributionsView() {
		setTitle("Set Distributions");
		getContentPane().setLayout(null);
		
		
		idLabel = new JLabel("ID");
		idLabel.setBounds(50, 20, 60, 17);
		getContentPane().add(idLabel);
		
		lblCategory = new JLabel("Category");
		lblCategory.setBounds(50, 60, 60, 17);
		getContentPane().add(lblCategory);
		
		lblType = new JLabel("Type");
		lblType.setBounds(50, 100, 60, 17);
		getContentPane().add(lblType);
		
		lblProduct = new JLabel("Product");
		lblProduct.setBounds(50, 140, 60, 17);
		getContentPane().add(lblProduct);
		
		
		txtCatID = new JTextField();
		txtCatID.setBounds(new Rectangle(133, 20, 127, 17));
		getContentPane().add(txtCatID);
		
		txtCategory = new JTextField();
		txtCategory.setBounds(133, 60, 127, 17);
		getContentPane().add(txtCategory);
		txtCategory.setColumns(10);
		
		txtName = new JTextField();
		txtName.setBounds(133, 100, 127, 17);
		getContentPane().add(txtName);
		txtName.setColumns(10);
		
		jComboProdcut = new JComboBox();
		jComboProdcut.setBounds(133, 140, 127, 17);
		getContentPane().add(jComboProdcut);
		

	}
	public void addSettingDistributionsViewListener(ActionListener actionListener){
		txtCatID.addActionListener(actionListener);
		txtCategory.addActionListener(actionListener);
		txtName.addActionListener(actionListener);
		jComboProdcut.addActionListener(actionListener);
	
	}
}
